# coding:utf-8
import redis
class Config(object):
    "基本配置类"
    DEBUG = True
    SECRET_KEY = "EWGGEijk9899"
    SQLALCHEMY_DATABASE_URI="mysql://root:123456@localhost:3306/ihome"
    SQLALCHEMY_TRACK_MODIFICATIONS = True

    REDIS_HOST = "localhost"
    REDIS_PORT = 6379

    SESSION_TYPE ="redis"
    SESSION_REDIS = redis.StrictRedis(host=REDIS_HOST,port=REDIS_PORT)
    SESSION_USE_SIGNER = True   #对cokie中的session_id影藏
    PERMANENT_SESSION_LIFETIME = 86400  #session数据有效期，秒

class DevConfig(Config):
    "开发环境"
    pass

class ProductCofig(Config):
    "生產環境"
    pass

config_map = {
    "dev": DevConfig,
    "product":ProductCofig
}